<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="/Store/Public/layui/css/layui.css"></link>
<script src="/Store/Public/Admin/js1/jquery-1.10.1.min.js"></script>
<script src="/Store/Public/layer/layer.js"></script>
</head>
<body>
<div class="layui-form-item">
    &nbsp;
    <label class="layui-form-label">权限标题：</label>
    <div class="layui-input-block">
    <input type="text" name="title" style="width:260px" class="access" required  lay-verify="required" placeholder="请输入权限标题" autocomplete="off" class="layui-input" >
    </div>
    &nbsp;&nbsp;&nbsp;
    <div class="layui-form-item layui-form-text">
    <label class="layui-form-label">URIS：</label>
    <div class="layui-input-block">
      <textarea name="desc" placeholder="请输入权限关联的url" id="url" class="layui-textarea" style="width:260px"></textarea>
    </div>
    </div>
      &nbsp;&nbsp;&nbsp;&nbsp;
      <div class="layui-form-item">
          <div class="layui-input-block">
          <button class="layui-btn"lay-submit lay-fileter="formDemo" id="commit">提交</button>
      </div>
      </div>
</div>
<script>
$('#commit').click(function() {
	var access=$('.access').val();
	var Url=$('#url').val();
	$.post('/Store/index.php/Admin/Access/access_add',{access:access,Url:Url},function(obj) {
		if(obj.pass==1) {
			layer.msg(obj.msg);
		}
	
	},'json')
})
</script>
</body>
</html>